<?php
namespace serv\task\warehouse;

use L;
use of\base\com\mq;

class fourstar
{
    //同步四叶仓的的库存
    public static function pull()
    {
        $sql = "SELECT warehouse_id, warehouse_code FROM warehouse WHERE 1 AND `type` = 90 AND `status` = 1";
        $result = L::sql($sql, 'warehouse');
        if (!empty($result)) {
            foreach ($result as $k => $v) {
                $key = "syncFourstarStock_{$v['warehouse_id']}";
                //echo json_encode($v); exit;
                mq::set(["syncFourstarStock", $key, $k * 10], $v);
            }
        }
    }


}